package com.csun.cmny.provider.service.impl;

import com.csun.cmny.provider.dao.CacTypeMapper;
import com.csun.cmny.provider.pojo.CacType;
import com.csun.cmny.provider.service.CacTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("CacTypeService")
public class CacTypeServiceImpl implements CacTypeService {
    @Resource
    CacTypeMapper cacTypeMapper;

    @Override
    public int insert(CacType cacType) {
        return cacTypeMapper.insertSelective(cacType);
    }

    @Override
    public int update(CacType cacType) {
        return cacTypeMapper.updateByPrimaryKeySelective(cacType);
    }

    @Override
    public CacType selectCacTypeById(Integer cacTypeId) {
        return cacTypeMapper.selectByPrimaryKey(cacTypeId);
    }

    @Override
    public int delById(Integer cacTypeId) {
        return cacTypeMapper.deleteByPrimaryKey(cacTypeId);
    }

    @Override
    public CacType selectByCacType(CacType cacType) {
        return cacTypeMapper.selectByCacType(cacType);
    }

    @Override
    public List<CacType> selectShowAll(Integer homeId) {
        return cacTypeMapper.selectShowAll(homeId);
    }

    @Override
    public CacType selectOneById(Integer cacTypeId) {
        return cacTypeMapper.selectOneById(cacTypeId);
    }
}
